<?php


class indexModel extends Model{
    public function login($user,$pwd){
        $sql = "select a.id,a.user,a.perm,a.pwd,b.type from admin a left join admintype b on a.perm = b.id where a.user = '{$user}' and a.pwd = '{$pwd}'";
        $admin = $this->link->selectByAll($sql);
        if($admin){
            return $admin;
        }
    }
}